package com.example.controller;

import com.example.pojo.Result;
import com.example.pojo.productDataCheckListPojo;
import com.example.service.productDataCheckListService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;
import java.util.Map;

@RestController
public class productDataCheckListController {
    @Autowired
    private productDataCheckListService productDataCheckListService;

    //查询一条数据,根据筛选的日期值进行筛选数据并返回（利用map功能）
    @PostMapping("/queryExceptionByTimeScopeProductDataCheckList")
    public Result queryExceptionByTimeScopeProductDataCheckList(@RequestBody Map<String, Object> map) {
        List<productDataCheckListPojo> pojo = productDataCheckListService.queryByTimeScope(map);
        return Result.success(pojo);
    }

    @PostMapping("/queryAllProductDataCheckListProductDataCheckList")
    public Result queryAllProductDataCheckListProductDataCheckList() {
        List<productDataCheckListPojo> pojos = productDataCheckListService.queryAll();
        return Result.success(pojos);
    }



}
